package com.aj.activity;

import java.util.ArrayList;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.GridView;

import com.aj.activity.adapter.MoreFamilyAdapter;
import com.aj.utils.Contants;

public class MoreFamilyActivity extends BaseActivity {
	private GridView familygridview;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_more_family);
		initView();
	}

	private void initView() {
		ArrayList<String> arrayString = new ArrayList<String>();
		for (int i = 0; i < 6; i++) {
			arrayString.add("爸爸");
		}
		MoreFamilyAdapter moreFamilyAdapter = new MoreFamilyAdapter(this,
				arrayString);
		familygridview = (GridView) findViewById(R.id.familygridview);
		familygridview.setAdapter(moreFamilyAdapter);
		ItemClick itemClick = new ItemClick();
		familygridview.setOnItemClickListener(itemClick);
	}

	class ItemClick implements OnItemClickListener {
		@Override
		public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
				long arg3) {
			Intent intent=new Intent(Contants.FAMILY_PHOTO_ACTIVITY_ACTION);
			startActivity(intent);
		}
	}
}
